﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;

namespace PartyManagement.Models
{
    public class PartyContext : DbContext
    {
        public PartyContext()
            : base("name=PartyDBConnection")
        {
            //Database.SetInitializer(new DropCreateDatabaseIfModelChanges<PartyContext>());
            Database.SetInitializer(new DropCreateDatabaseAlways<PartyContext>());
        }

        public DbSet<Role> Roles { get; set; }
        public DbSet<User> Users { get; set; }
        public DbSet<Group> Groups { get; set; }
        public DbSet<UserInGroup> UserInGroups { get; set; }
        public DbSet<FoodCategory> FoodCategories { get; set; }
        public DbSet<Food> Foods { get; set; }
        public DbSet<Menu> Menus { get; set; }
        public DbSet<FoodInMenu> FoodInMenus { get; set; }
        public DbSet<Event> Events { get; set; }
        public DbSet<Attend> Attends { get; set; }
    }
}